Code coverage report for directives/oblique-features.directive.coffee

Statements: 28.57% (2 / 7)      Branches: 100% (0 / 0)      Functions: 20% (1 / 5)      Lines: 33.33% (1 / 3)      Ignored: none     

All files » directives/ » oblique-features.directive.coffee
1 2 3 4 5 6 7 8 9 10 11 12 131                        
angular.module 'oblique-features'
.directive 'ofFeature', (featuresService) ->
  restrict: 'EA'
  transclude: true
  scope:
    feature: '@'
  controller: ($scope, featuresService) ->
    $scope.checkFeatureEnabled = (featureName) ->
      featuresService.checkFeatureEnabled(featureName)
    $scope.toggleFeatureEnabled = (featureName) ->
      featuresService.toggleFeatureEnabled(featureName)
  template: '<span ng-if="checkFeatureEnabled(feature)" ng-transclude />'